Efficient in-system programming structure and method for non-volatile programmable logic devices

ABSTRACT

An in-system programing/erasing/verifying structure for non-volatile programable logic devices includes a data input pin, a data output pin, an instruction register, a plurality of data registers including an ISP register, wherein said instruction register and said plurality of data registers are coupled in parallel between said data input pin and said data output pin, and a controller for synchronizing said instruction register and said plurality of data registers. The ISP register includes: an address field, a data field, and a status field. An ISP instruction need only be entered once to program/erase the entire device. Specifically, the address/data packets can be shifted back to back into the ISP register without inserting multiple instructions between each packet at the data input pin, thereby dramatically decreasing the time required to program/erase the entire device in comparison to known ISP methods. Furthermore, the invention provides an efficient method for providing the status (i.e. result), of the ISP operations to either the end-user or the supporting software.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to programable logic devices and in particular to an in-system programing scheme for those devices.

2. Description of the Related Art

Programmable logic devices (PLDs) typically make use of one or more non-volatile memory cell (e.g. EPROM, EEPROM, Flash EPROM, or Flash EEPROM) arrays which programmably create data paths and logic functions within the device that are specific to the user's design. Typically, these arrays are erasable, thereby allowing the desired functionality of the PLD to be re-programmed many times.

Various types of program, erase, and verify operations allow the user to program and re-program the PLD. For PLDs that are programmed out-of-system in a programing socket, much of the burden for programing, erasing and verifying the contents of the memory arrays is placed on the software controlling the programer. Additionally, out-of-system programmers typically have parallel access to the address and data pins of the chip, thereby allowing the programming software to cycle quickly through the necessary address and data packets needed to program the device, which contributes to the efficiency of the programing operation.

However, the industry is increasingly using PLDs that can be programmed and erased in-system, that is, while these devices are soldered into place on the circuit board in which the devices will be used. Because the programming software is much more restricted in its access to the in-system PLD, more of the burden for the program, erase, and verify procedures is placed on the chip itself.

As is well known to those in the art, the term In-System Programming (hereinafter ISP) refers to the entire process of programming a device in-system, and, therefore, encompasses the actions of erasing and verifying the design in the device in addition to the specific action of memory cell programming. For ISP processes, the programming software is conventionally limited to serial access to the device through a small number of dedicated pins (typically 4 or 5). This configuration immediately makes the program, erase, and verify operations less efficient because communication with the chip is limited to a single serial port through which all address and data information, as well as the necessary ISP instructions, must enter the device.

Additionally, the high-voltage power supply bus for programming of the device is not available. Thus, internal charge-pumps are required on-chip to generate the necessary voltage levels from conventional internal standard Vcc levels (4.5-5.5V). However, the on-chip charge-pumps cannot provide the quick, strong drive of an external supply. Therefore, programming and erasing operations for ISP devices can be significantly less efficient than operations for out-of-system devices.

Typically, an ISP device contains a number of different instruction and data shift registers which are accessed through the same serial port. These registers are used to hold the instruction code or the address and data values which might ordinarily be driven at the pins of the device in a parallel, out-of-system programming process. In this ISP process, the controlling software includes ISP instructions which control access to the data registers and determime which ISP operation is currently active.

In programming data to the location(s) addressed by a single address, a typical ISP algorithm may require that a LOAD instruction be entered serially into the ISP device, followed by the serial entry of an address/data packet. Then, the LOAD instruction is terminated and the actual PROGRAM instruction is shifted into the registers, thereby initiating the programming cycle for the current address/data. After the programming cycle, an additional VERIFY instruction may be required to verify that the intended data was successfully programmed at the given address.

Because there is only one serial port available for entering ISP instructions as well as address/data packets, a typical ISP device requires multiple switches between instructions and data for each address during programming, thereby decreasing the device's efficiency. Therefore, a need arises for a method of performing efficient in-system programming, erasing, and design verification of PLDs.

SUMMARY OF THE INVENTION

According to the present invention, an in-system programming/erasing/verifying structure for non-volatile programmable logic devices includes a data input pin, a data output pin, an instruction register, a plurality of data registers including an ISP register, wherein said instruction register and said plurality of data registers are coupled in parallel between said data input pin and said data output pin, and a controller for synchronizing said instruction register and said plurality of data registers. The ISP register includes: an address field, a data field, and a status field. In one embodiment, the status field stores a two-bit code.

An ISP programming method in accordance with the present invention includes shifting a programming instruction into an instruction register, thereby selecting the ISP register as the active data register. Then, an address, data, and a first status code are shifted into the ISP register. The first status code allows initiation of a programming pulse for the data at that address. After the programing pulse is terminated, a verify operation is automatically performed on the data at the current address. The verify operation determines whether a selected memory cell (or set of memory cells) was properly programed. In one embodiment, the verify operation compares the states stored by the selected memory cells to the data shifted into the ISP register. Depending on whether the states match the data values, another predetermined status code is loaded into the ISP register.

An ISP erasing method in accordance with the present invention includes shifting an erase instruction into the instruction register, thereby once again selecting the ISP register as the active data register. To perform an erase operation, the address of the sector to be erased is shifted into the ISP register with the first status code (the data code being a "don't care"). The first status code allows the initiation of the erase pulse for the address of the sector indicated in the address field. After the erase pulse is terminated, the device automatically performs a self-blank check operation on the current sector to verify that it was properly erased. Depending on the success of the blank check, the status field of the ISP register is loaded with another predetermined code.

An ISP verifying method in accordance with the present invention includes shifting a verify instruction into the instruction register, thereby once again selecting the ISP register as the active data register. To perform the verify operation, the desired address is shifted into the ISP register with the first status code (data once again being a "don't care"). The first status code allows initiation of a verify pulse of a specified length. When the verify pulse is terminated, the states of the memory cells at the addressed location are loaded into the data field of the ISP register. These states may then be shifted out through the data output pin for inspection.

In accordance with the present invention, an ISP architecture and instruction set advantageously allows a single ISP instruction to perform a number of different operations on each address/data packet, thereby significantly reducing the inefficiency of known ISP program, erase, and verify routines for a PLD. For example, the appropriate ISP instruction need only be entered once to program/erase the entire device. In this manner, the address/data packets can be shifted back to back into the ISP register without inserting multiple instructions between each packet at the data input pin, thereby dramatically decreasing the time required to program/erase the entire device in comparison to known ISP methods. Furthermore, the invention provides an efficient method for providing the status (i.e. result), of the ISP operations to either the end-user or the supporting software. As yet a further advantage, the present invention facilitates multi-chip programming/erasing by connecting the data output pin of one device to the data input pin of another device.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a conventional JTAG architecture.

FIG. 2 shows a state diagram of the TAP controller in the present invention.

FIG. 3 illustrates the fields of an ISP register of the present invention.

FIG. 4 shows a truth table for the two-bit code used in the status field of the ISP register.

FIG. 5 illustrates an ISP architecture in accordance with one embodiment of the present invention.

FIG. 6 shows an ISP configuration for multi-chip programming/erasing.

FIG. 7 illustrates another embodiment of the present invention including a shadow ISP register.

DETAILED DESCRIPTION OF THE DRAWINGS

The ISP architecture and instruction set of the present invention is compatible with the Joint Test Action Group (JTAG) standard described in IEEE Std. 1149.1, sections 3, 4, 5 and 7, which are incorporated by reference herein. Referring to FIG. 1, the mandatory JTAG architecture for a component adhering to IEEE Std. 1149.1 includes a single instruction register 103, a set of data registers 106 (including a bypass register 106A and a boundary scan register 106B), and a TAP controller 101 (a 16-state finite state machine). A TDI pin 105, the serial input terminal to the device, provides signals to instruction register 103, bypass register 106A, and boundary scan register 106B. A TDO pin 107, the serial output terminal of the device, is driven by active register 104, which is triggered by the negative edge of clock signal TCK. A TMS pin 108 provides signals to control the state transitions of TAP controller 101, whereas a TCK pin 109 provides clock signals (possibly modified via circuitry 110) to synchronize TAP controller 101, instruction register 103, bypass register 106A, and boundary scan register 106B (all of which are serial shift registers).

The system logic 112 is selectively coupled to a plurality of input/output pins 111. Specifically, either signals from system logic 112 or boundary scan register 106B drive input/output pins 111. This interface between the JTAG architecture and input/output pins 111 is well known in the art and therefore is not described in detail herein.

A state diagram 200 of TAP controller 101, which controls the JTAG architecture of FIG. 1, is shown in FIG. 2. Referring to FIGS. 1 and 2, a first sequence 201 of state transitions, shifts instructions to instruction register 103 and a second sequence 202 of state transitions shifts data to one of the test data registers 106. Note that the Run-Test-Idle state 203 is used to initiate each of the ISP operations of the present invention (described below). State diagram 200, which is described in the IEEE Std. 1149.1 pages 5-1 to 5-16, is well known to those in the art and, therefore, is not explained in detail herein.

In accordance with the present invention, and referring to FIGS. 3 and 5, an ISP register 300, which includes an address field 301, a data field 302, and a status field 303 of an ISP operation, is added to the conventional JTAG architecture. To support ISP operations, three instructions, a function program (FPGM) instruction, a function erase (FERASE) instruction, and a function verify (FVFY) instruction, were added to the JTAG instruction set in the present invention. If any one of those instructions is entered into instruction register 103, then ISP register 300 is selected as the active data register between TDI pin 105 and TDO pin 107. Specifically, instruction decode circuitry 114 decodes the instruction bits in instruction register 113 and provides control/enable signals 114 to tristate buffers 115, for example. Note that multiplexer 116 is controlled by a Select signal provided by TAP controller 101.

In one embodiment of the present invention, status field 303 receives a two-bit code which indicates the corresponding functions shown in FIG. 4. Specifically, a status field input code of "10" indicates that address field 301 and/or data field 302 of ISP register 300 contain a valid address/data packet on which to operate. To prevent accidental programming or erasing of the device, no ISP operation is initiated unless this code is present in status field 303. This "10" code may also be present when contents are shifted out of ISP register 300. In this case, the "10" code indicates that the ISP operation was not allowed for some reason.

Shifting out a status field code of "00" indicates that the current operation has not completed. In contrast, the "01" code indicates that the ISP operation has completed, but that the operation failed, e.g. the data was not successfully programmed. Finally, the "11" code indicates that the ISP operation has successfully completed.

As indicated previously, an FPGM instruction shifted into instruction register 103 selects ISP register 300 as the active data register. To perform a programming operation in the present invention, an address/data packet with a status field code of "10" is shifted into ISP register 300 under control of TAP controller 101. After TAP controller 101 transitions to the Run-Test-Idle state 203 (FIG. 2), controller 101 detects status code "10", thereby triggering a programming pulse for the data stored in data field 302 at the address specified in address field 301. An internal timer (not shown, but well known in the art) ends the programing pulse at the appropriate time if TAP controller 101 remains in Run-Test-Idle state 203. If TAP controller 101 leaves this state prematurely, the programing pulse is terminated as soon as this state is exited.

Irrespective of the cause for termination, when the programming pulse ends, the device automatically performs a verify operation on the address just programmed to verify whether the selected memory cell was successfully programmed. Specifically, additional random logic (not shown but well known in the art) compares the states stored by the currently addressed memory cells to the values in data field 302 of ISP register 300. If those states match the values, thereby indicating that the programming was successful, the random logic indicates that the "11" code is the appropriate value for status field 303. TAP controller 101 then loads that value into ISP register 300. If the programming operation is completed, but the verify operation indicates that programming was not successful, the status field is loaded with "01" Finally, if the value of status field 303 is checked before the entire program/verify operation has completed, status field 303 is loaded with a "00" code.

The present invention provides a number of significant improvements to conventional ISP programming methods. First, only one instruction is required to handle both the programming and the subsequent verification of the data at any addressed location, thereby eliminating the need for a separate verification operation. Second, because only one instruction, the FPGM instruction, is used in this procedure, there is no need to shift in multiple instructions for each address. For example, the FPGM instruction need only be entered once to program the entire device. In this manner, the address/data packets can be shifted back to back into ISP register 300 without inserting multiple instructions between each packet at TDI pin 105, thereby dramatically decreasing the time required to program the entire device in comparison to known ISP methods. Finally, the code in status field 303 provides an end-user an immediate indication of the success or failure of the programming operation.

The FERASE instruction, like the FPGM instruction if shifted into instruction register 103, selects ISP register 300 as the active data register. However, the FERASE instruction activates an erase operation that typically operates on a large sector of memory cells (for example, 7920 memory cells) rather than programming only a few cells (in one embodiment, no more than eight memory cells). To perform an erase operation, the address of the sector to be erased is shifted into ISP register 300 with the "10" status code (note that the bits stored in data field 302 are a "don't care" in this operation). After TAP controller 101 transitions to the Run-Test-Idle state 203, controller 101 detects this status code, thereby triggering the erase pulse for the address of the sector indicated in address field 301. An internal timer (not shown) ends the erase pulse at the appropriate time if TAP controller 101 remains in Run-Test-Idle state 203. If TAP controller 101 leaves this state prematurely, the erase pulse terminates as soon as this state is exited.

irrespective of the reason for termination, when the erase pulse ends, the device automatically performs a self-blank check operation on the current sector to verify whether the sector was successfully erased by the random logic. The self-blank check is described in detail in U.S. Pat. application Ser. No. 08/397,821, entitled "HIGH-SPEED MINIMAL LOGIC SELF BLANK CHECKING METHOD FOR PROGRAMMABLE LOGIC DEVICE", which is incorporated by reference herein. If the blank check is successful, thereby also indicating that the erase operation was successful, status field 303 of ISP register 300 is loaded with the "11" code. If the erase operation is completed, but the blank check failed, status field 303 is loaded with the "01" code. Finally, if thee value of status field 303 is checked before the entire erase/blank check operation has completed, the field is loaded with a "00" code.

The present invention provides a number of significant improvements to conventional ISP erase methods. First, only one instruction, FERASE, is required to handle both the erase and the subsequent blank check of the given sector, thereby eliminating the need to use the normal verify instruction to individually check each address for erased memory cells. Second, because only one instruction is used in this procedure, there is no need to shift in multiple instructions for each sector. For example, the FERASE instruction need only be entered into instruction register 103 once to erase the entire device. Thus, sector addresses can be shifted back to back into ISP register 300 without inserting multiple instructions between each address at TDI pin 105, thereby dramatically decreasing the time required to erase the entire device in comparison to known ISP methods. Finally, the code of status field 303 immediately indicates the success or failure of the erase operation to the end-user.

The FVFY instruction is used to read back the data at any addressed location in the device when no prior program or erase operation is desired. Once again, the FVFY instruction, like the FPGM and FERASE instructions, if shifted into instruction register 103, selects ISP register 300 as the active data register. For the verify mode, the desired address is shifted into ISP register 300 with a code of "10" in status field 300 (note that the bits stored in data field 302 are again a "don't care"). After TAP controller 101 enters the Run-Test-Idle state 203, controller 101 detects this status code, thereby triggering a verify pulse of a specified length. When the verify pulse is terminated, either by the internal timing or by leaving Run-Test-Idle state 203, the state of the memory cell at the addressed location is loaded into data field 302 of ISP register 300. This state may then be shifted out through TDO pin 107 for inspection. The code of status field 303 in this case is "11", thereby indicating that the verify operation has completed. A code of "00" indicates that the status was checked before the operation was done.

An ISP verify method as described above, advantageously eliminates the need to shift in multiple instructions for each address. For example, the FVFY instruction need only be entered once into instruction register 103 to verify the entire chip. In this manner, addresses for the to-be-identified memory cells may be entered back to back into ISP register 300, without inserting multiple instructions between each address at TDI pin 105.

As yet a further advantage and referring to FIG. 6, the present invention facilitates multi-chip programming/erasing by connecting a TDO pin 107A of device 600A to a TDI pin 105B of device 600B, and providing the instruction bits in instruction register 103A to active register 104A (and then to TDO pin 107A). In this configuration, the time of programming/erasing multiple devices is approximately equal to the time of programming one device plus the time for propagating the appropriate signals from TDI pin 105 to TDO pin 107 for each device. Thus, as the chain of devices grows, the time to serially shift in data/instructions also grows. However, the actual operation (i.e. programming, erasing, or verifying) is done in parallel as if only one device were being programmed.

In a preferred configuration shown in FIG. 7, a shadow ISP register 300A is coupled to ISP register 300. In this configuration, a status code "01" received by ISP register 300 triggers combinatorial logic 311 to transfer an enabling signal to logic gate 310. In this embodiment, logic gate 310 is an AND gate which receives a logic one enabling signal from combinatorial logic 311 as well as a constant value (also a logic one signal) from memory 312. In this manner, AND gate 310 outputs a high signal to the clock terminal of shadow register 300A, thereby allowing shadow ISP register 300A to capture the bits of ISP register 300 (in this embodiment, 27 bits). Shadow ISP register 300A stores such bits until another status code "01" is received, at which time shadow ISP register 300A stores the updated address/data packet of ISP register 300. In this manner, the present invention ensures that if more than one programming cycle is necessary (for example, if flash EPROM arrays are used) and the code in the status field 303 (FIG. 3) (as verified through TDO pin 107) indicates that programming was unsuccessful, then the address/data packet in shadow register 300A (in this embodiment, 25 bits) is accessed automatically without the need for a separate load cycle.

In this configuration, the present invention also provides that if the results of status field 303 are a "don't care" (for example, if all memory cells receive one programming cycle), the addresses of those cells which did not program are accessed externally (via ISP register 300) and then subjected to an additional programming cycle at a later point in time. As noted previously, shadow ISP register 300A stores the bits from the previous enabling cycle until another status code "01" is received, at which time shadow ISP register 300A stores the updated address/data packet of ISP register 300.

This disclosure is illustrative only and not limiting. Specifically, although the discussion here primarily focuses on the programming of PLD's, the same principles may be applied to any device that makes use of non-volatile memory arrays. Furthermore, although the above-described embodiment typically includes memory cell arrays that may be programmed and erased electrically, i.e. EEPROM, Flash EPROM, or Flash EEPROM arrays, the present invention is used in other embodiments including EPROM arrays which must be exposed to ultra-violet light to be erased. Moreover, although the flexibility of the JTAG standard as a general purpose tool for operating on in-system components allows its use to be extended to ISP, the present invention is applicable in any similar architecture. The present invention is set forth in the claims. 

We claim:
 1. An in-system programing/erasing/verifying structure for non-volatile programable logic devices including:a data input pin; a data output pin; an instruction register; a plurality of data registers including an ISP register, wherein said ISP register includes:an address field; a data field; and a status field, wherein said instruction register and said plurality of data registers are coupled in parallel between said data input pin and said data output pin; and a controller for synchronizing the clocking of said instruction register and said plurality of data registers.
 2. The in-system programming/erasing/verifying structure in claim 1 wherein said status field stores a two-bit code.
 3. An in-system programing method for a non-volatile programable logic device including:shifting a program instruction into an instruction register, thereby selecting an ISP register as the active data register; shifting an address, data, and status code into said ISP register; initiating a programing pulse for said data at said address; terminating said programing pulse; and automatically performing a verify operation on said address.
 4. The in-system programing method of claim 3 wherein said verify operation determines whether a selected memory cell is programmed.
 5. The in-system programing method of claim 4 wherein said verify operation compares the state stored by said selected memory cell to said data shifted into said ISP register.
 6. The in-system programming method of claim 5 wherein if said state matches said value, then a predetermined status code is loaded into said ISP register.
 7. An in-system erasing method for a non-volatile programmable logic device including:shifting a erase instruction into an instruction register, thereby selecting an ISP register as the active data register; shifting an address, data, and status code into said ISP register; initiating an erasing pulse at said address; terminating said erasing pulse; and automatically performing a verify operation on said address.
 8. The in-system erasing method of claim 7 wherein said verify operation determines whether a selected memory cell is erased.
 9. The in-system erasing method of claim 8 wherein if said memory cell is erased, then a predetermined status code is loaded into said ISP register.
 10. An in-system verifying method for a non-volatile programmable logic device including:shifting a verify instruction into an instruction register, thereby selecting an ISP register as the active data register; shifting an address, data, and status code into said ISP register; initiating a verifying pulse at said address; terminating said verifying pulse; and automatically loading the state of the memory cell at said address into a data field of said ISP register. 